{% extends "base.html" %}

{% block content %}

<div id="menu-toolbar" class="ui-state-active _ui-corner-all">
    <ul class ="right">
        <li><a href="/iteration_form?project_id={{ project.key.id }}">Add Iteration</a></li>
        <li>|</li>
        <li><a href="/admin/project_form?id={{ project.key.id }}" id="id_close_link">Edit</a></li>
    </ul>
    <ul class ="left">
        <li><a href="/project_backlog?id={{project.get_backlog.key.id}}">{{project.get_backlog.name}}</a></li>
        <li>&raquo;</li>
        <li><a href="/projects">Projects</a></li>
    </ul>
</div>

<div id ="title-container">
    <h2>{{ project.name }}</h2>
    <span>Description: {{ project.description }}</span>
</div>

<div id="table-contain" class="ui-widget">
<table class="ui-widget ui-widget-content">
    <thead>
        <tr class="ui-widget-header _ui-state-default" >
            <th>Name</th>
            <th>Opened By</th>
            <th>Description</th>
            <th>Start Date</th>
            <th>End Date</th>
        </tr>
    </thead>
    {% for iteration in project.get_iterations %}
    <tbody>
        <tr>
            <td>
                <a href="/?id_it={{ iteration.key.id }}"> {{ iteration.name|escape }}</a>
            </td>
            <td>{{ iteration.opened_by }}</td>
            <td>{{ iteration.description|escape }}</td>
            <td>{{ iteration.start_date|date:"D, M j, Y" }}</td>
            <td>{{ iteration.end_date|date:"D, M j, Y" }}</td> <!--date:"D, M j, Y \a\t P" -->
        </tr>
    </tbody>
    {% endfor %}
</table>
</div>

<script type="text/javascript">
    $(document).ready(function(){

    });
</script>

{% endblock %}
